<?php
/**
 * 业务员
 * Created by PhpStorm.
 * User: echa
 * Date: 2018/3/7
 * Time: 14:29
 */

namespace App\Http\Controllers\WarehouseManage;
use App\Http\Controllers\ApiController;
use App\Services\Warehouse\TheSalesmanService;
use Illuminate\Http\Request;

class TheSalesmanController extends ApiController{

    protected $TheSalesmanService;
    public function __construct(TheSalesmanService $theSalesmanService){
        $this->TheSalesmanService=$theSalesmanService;
    }

    public function GetTheSalesmanTypeList(){
        try{
            $list=$this->TheSalesmanService->TheSalesmanTypeList();
            return $list;
        }catch (\Exception $exception){
            return $this->failed($exception->getMessage());
        }

    }

    public function SaveTheSalesmanType(Request $request){
        $savedata=[];
    }

    public function GetTheSalesmanInfo(Request $request){
        $FStaffNumber=$request->employees_num;
        $list=$this->TheSalesmanService->ListTheSalesman($FStaffNumber);
        return $list;
    }
}